Skip to content

Upgrade Console SDK to 4.22 and fix review issues from PR #8#10

Open
jhadvig wants to merge 3 commits into
openshift:mainfrom
jhadvig:4.22-update-v2
Open

Upgrade Console SDK to 4.22 and fix review issues from PR #8#10
jhadvig wants to merge 3 commits into
openshift:mainfrom
jhadvig:4.22-update-v2

Conversation

@jhadvig

@jhadvig jhadvig commented Jun 3, 2026

Copy link
Copy Markdown
Member

Summary

Follow-up to #8. Addresses the blocking and non-blocking issues identified during review.

Blocking fixes (runtime crash on OCP 5.0)

  • SDK 4.22 upgrade — React 17→18, react-router v5→v7, react-i18next v11→v16, PatternFly 6.2→6.4, i18next 23→25
  • useHistoryuseNavigate — fixes react_router_dom.useHistory is not a function crash
  • react-router-domreact-router — deprecated module replaced in all imports
  • getRiskColor case-insensitive — CRD serves Low/Medium/High/Critical, switch was matching lowercase only

Non-blocking fixes

  • Remove exact from console-extensions.json (react-router v7 default)
  • Add trailing newline to locale JSON
  • Update consolePlugin.dependencies to >=4.22.0-0

Docs

  • Replace template README with plugin-specific content
  • Add mock-analysis-result.yaml for cluster testing without Lightspeed operator

Supersedes #9 (rebased on top of #8).

Test plan

  • yarn test — 56 tests pass
  • yarn build — production webpack build succeeds with SDK 4.22
  • Tested on OCP 5.0 cluster with mock AnalysisResult data

🤖 Generated with Claude Code

@openshift-ci
openshift-ci Bot requested review from fao89 and hongkailiu June 3, 2026 14:20
@racheljpg

Copy link
Copy Markdown

Hey Jakub, just looking over this PR and trying to get to grips with things, looks good. Just a few quick qs:

CRD serves Low/Medium/High/Critical what happens if an unknown value is returned here? (Or is that even possible?)

I see in the docs section there is mention of an ONBOARDING-FINDINGS.md, but I don't think I see that in this PR. Was it intended to be, or should the description be updated?
Thanks!

@jhadvig

jhadvig commented Jun 17, 2026

Copy link
Copy Markdown
Member Author

Thanks for looking at this Rachel!

what happens if an unknown value is returned here? (Or is that even possible?)

Unknown severity values are handled gracefully — the type definition allows blocker | warning | info, and the rendering code uses fallbacks throughout: SeverityLabel falls back to a grey "Unknown" label, AnalysisResultView defaults to the info alert variant and displays the raw severity string in the title, and sortFindings() places unknown values last. So nothing would crash, it would just render as a generic info-level finding.

I see in the docs section there is mention of an ONBOARDING-FINDINGS.md, but I don't think I see that in this PR.

Good catch 👍 that file exists locally but wasn't included in this PR. It was more of a personal notes file from onboarding onto the codebase, not something that should live in the repo. I'll update the PR description to remove that reference.

@harche harche left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Jun 24, 2026
@openshift-ci

openshift-ci Bot commented Jul 8, 2026

Copy link
Copy Markdown

@jhadvig: all tests passed!

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

jhadvig and others added 3 commits July 20, 2026 14:46
- SDK 4.22: React 17→18, react-router v5→v7, react-i18next v11→v16,
  PatternFly 6.2→6.4, i18next 23→25
- Fix useHistory→useNavigate (runtime crash on OCP 5.0)
- Fix react-router-dom→react-router imports
- Fix getRiskColor case-insensitive matching (CRD serves capitalized)
- Remove exact from console-extensions.json (react-router v7 default)
- Add trailing newline to locale JSON
- Update consolePlugin dependency to >=4.22.0-0

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Replace template README with plugin-specific content
- Add mock-analysis-result.yaml for cluster testing without Lightspeed
- Add ONBOARDING-FINDINGS.md documenting API mismatches and dev setup
- Updated Helm Charts
- Update locales
- Update getAnalysisDataFromResult to support arrays
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@openshift-ci openshift-ci Bot removed the lgtm Indicates that a PR is ready to be merged. label Jul 20, 2026
@openshift-ci

openshift-ci Bot commented Jul 20, 2026

Copy link
Copy Markdown

New changes are detected. LGTM label has been removed.

@openshift-ci

openshift-ci Bot commented Jul 20, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jhadvig

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants